package com.cskaoyan.catmall.service.Impl;

import com.cskaoyan.catmall.dao.GoodCategoryDao;
import com.cskaoyan.catmall.model.vo.GoodCategoryVo;
import com.cskaoyan.catmall.service.GoodCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: 逍遥子
 * @Date: 2022/01/07/16:54
 * @Description:
 */
@Component
public class GoodCategoryImpl implements GoodCategoryService {

    @Autowired
    GoodCategoryDao goodCategoryDao;

    @Override
    public GoodCategoryVo selectGoodCategory() {
        // 查询商品分类
        List<GoodCategoryVo.ListDTO> listDTOList = goodCategoryDao.selectGoodCategory();
        return new GoodCategoryVo(listDTOList.size(), 1, 1, 1, listDTOList);

    }
}
